#ifndef MODBUS_ADDRESS_H
#define MODBUS_ADDRESS_H

#include <QtCore>

//Modbus的地址
class CModbusAddress
{
private:
    CModbusAddress();
    ~CModbusAddress();

public:
    enum eModbusAddress{
        //电池堆数据
        STACK_DATA = 1,
        //电池组数据
        BANK_DATA_MIN = 2, //1#电池组
        BANK_DATA_MAX = 17, //16#电池组
        //保持寄存器
        HOLD_REGISTER = 99,
        //输入寄存器
        INPUT_REGISTER = 100,
        //动环数据
        ENV_DATA_MIN = 101, //1#设备
        ENV_DATA_MAX = 120, //20#设备
    };

public:
    static bool IsStackData(int iModbusAddress);
    static bool IsBankData(int iModbusAddress);
    static bool IsHoldReg(int iModbusAddress);
    static bool IsInputReg(int iModbusAddress);
    static bool IsEnvData(int iModbusAddress);
};

#endif //MODBUS_ADDRESS_H


